module.exports =(res,urlObj,bodyObj,sql) => {
  const query=`SELECT id,name,hp,ap,pow,mag,ski,spe,def,res,luc,mov,dutyType,srcName FROM heros`;
  sql.query(query,  (error, results, fields) =>{
    if (error) res.end(JSON.stringify({code:0,msg:"请求失败"}));
    else res.end(
      JSON.stringify({
        code: 0,
        msg: "请求成功",
        data: results
      })
    );
  });
}
